import axios from "@/ulits/request"

export default {
  state: {
    searchList: null,
  },
  getters: {
    goodsList(state) {
      return state.searchList.goodsList
    },
    trademarkList(state) {
      return state.searchList.trademarkList
    },
    attrsList(state) {
      return state.searchList.attrsList
    }
  },
  mutations: {
    GETSEARCHLIST(state, data) {
      state.searchList = data
    }
  },
  actions: {
    async getSearchList(state, data = {}) {
      const { data: res } = await axios.post('/list', data)
      state.commit('GETSEARCHLIST', res)
    }
  }
}   